@model SeventhSenseSystems.HighFlyingPm.Business.Entities.Issue

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Subject)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Subject)
    @Html.ValidationMessageFor(model => model.Subject)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.IssueStatuseId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.IssueStatuseId)
    @Html.ValidationMessageFor(model => model.IssueStatuseId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.AssingedToId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.AssingedToId)
    @Html.ValidationMessageFor(model => model.AssingedToId)
</div>

<div class="editor-label">
    Project
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ProjectId, ((IEnumerable<SeventhSenseSystems.HighFlyingPm.Business.Entities.Project>)ViewBag.PossibleProjects).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.ProjectId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.ProjectId)
</div>
<div class="editor-label">
    Author
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.AuthorId, ((IEnumerable<SeventhSenseSystems.HighFlyingPm.Business.Entities.User>)ViewBag.PossibleAuthors).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.LastName), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.AuthorId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.AuthorId)
</div>
<div class="editor-label">
    Tracker
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.TrackerId, ((IEnumerable<SeventhSenseSystems.HighFlyingPm.Business.Entities.Tracker>)ViewBag.PossibleTrackers).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.TrackerId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.TrackerId)
</div>
